#define  _CRT_SECURE_NO_WARNINGS 1

#include "CirQueue.h"

void TestCirQueue()
{
	pCirQueue obj = CirQueueInit(5);

	printf("CirQueueSize: %d\n", CirQueueSize(obj));
	/*CirQueuePush(obj, 1);
	CirQueuePush(obj, 2);
	CirQueuePush(obj, 3);
	CirQueuePush(obj, 4);
	CirQueuePush(obj, 5);
	CirQueuePop(obj);
	CirQueuePop(obj);
	CirQueuePop(obj);
	CirQueuePop(obj);*/

	while (!CirQueueFull(obj))
	{
		CirQueuePush(obj, 10);
	}
	printf("CirQueueFront: %d\n", CirQueueFront(obj));
	printf("CirQueueBack: %d\n", CirQueueBack(obj));
	printf("CirQueueSize: %d\n", CirQueueSize(obj));

	while (!CirQueueEmpty(obj))
	{
		printf("%d ", CirQueueFront(obj));
		CirQueuePop(obj);
	}

	CirQueueDestory(&obj);
	
}

int main()
{
	TestCirQueue();

	return 0;
}